const http = require('http');
const fs = require('fs');
const mime = require('mime');

http.createServer((req, res) => {
    const urlString = req.url;
    console.log('urlString-----', urlString);
    if (urlString == '/favicon.ico') {
        res.end()
        return
    }

    const file = fs.readFileSync(`.${urlString}`);
    res.end(file);
}).listen(8080);

